package basic.socket;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @author bingo
 * @Description
 * @Date 2018/7/18
 */
public class InetAddresDemo {

    public static void main(String[] args) {
        try {
            InetAddress inetAddress = InetAddress.getByName("PCOS-1809091018");
            System.out.println(inetAddress.getAddress());
            System.out.println(inetAddress.getHostAddress());
            System.out.println(inetAddress.getHostName());
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }

    }
}
